package com.example.fallback;

import com.example.dto.User;
import com.example.web.HelloService;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: xben
 * @Date: 2019/1/30 15:21
 */
@Component
public class HelloServiceFallback implements HelloService {

    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello1(@RequestParam("name") String name) {
        return "error";
    }

    @Override
    public User hello2(@RequestHeader("name") String name, @RequestHeader("age") Integer age) {
        return new User("未知的", 0);
    }

    @Override
    public String hello3(User user) {
        return "error";
    }

    @Override
    public String testFromClient(String name) {
        return "error";
    }
}
